<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <script src="./echarts.min.js"></script>
    <div id="main" style="width: 600px; height: 400px"></div>
    <script type="text/javascript">
      var myChart = echarts.init(document.getElementById("main"));
      var option = {
        // title: {
        //   text: "防伪商标————徐烨程-折现图",
        //   left: "center",
        //   subtext: "副标题u",
        // },
        // textStyle: {
        //   color: "red",
        //   fontStyle: "italic",
        //   fontSzie: 18,
        // },
        // legend: {
        //   left: "right",
        //   orient: "vertical",
        //   top: "bottom",
        // },
        // // 工具栏
        // toolbox: {
        //   feature: {
        //     // 保存图片
        //     saveAsImage: {},
        //     // 还原
        //     restore: {},
        //   },
        // },
        grid: [
          {
            left: "7%",
            width: "38%",
            top: "7%",
            height: "60%",
          },
          {
            right: "7%",
            width: "38%",
            top: "7%",
            height: "60%",
          },
        ],
        xAxis: [{ gridIndex: 0, min: 1, max: 20 }, { gridIndex: 1 }],
        yAxis: [{ gridIndex: 0 }, { gridIndex: 1 }],
        series: [
          {
            type: "bar",
            name: "bar-string",
            data: [1, 2, 3, 5, 6],
            xAxisIndex: 0,
            yAxisIndex: 0,
          },
          {
            type: "line",
            name: "line-number",
            data: [7, 8, 3, 9, 10],
            xAxisIndex: 1,
            yAxisIndex: 1,
          },
        ],
      };
      myChart.setOption(option);
    </script>
  </body>
</html>
